package com.carlinfo.users.pojo;

import java.util.Date;

/**
 * @author Gonsen 管理员的实体类
 */
public class AAdmin {

	/**
	 * 属性对应数据库表中的字段，一一对应
	 * */
	private int id;// id
	private int roleID;//单点登录唯一标识
	private String email;//单点登录的邮箱
	private String password;
	private byte status;//状态：0：禁用  1：启用
	private Date createtime;//创建时间
	private Date updatetime;//更新时间

	/*添加一个枚举类用于状态的描述,状态的字符串描述*/
	private String statusStr;
	
	public String getStatusStr() {
		AAdminEnum[] adminEnmus = AAdminEnum.values();
		for (int i = 0; i < adminEnmus.length; i++) {
			AAdminEnum adminEnmu = adminEnmus[i];
			if(adminEnmus.toString().startsWith("STATUS")){
				if(this.getStatus() == adminEnmu.getStatus()){
					this.statusStr = adminEnmu.getName();
				}
			}
		}
		return statusStr;
	}

	/**
	 * 读写器，get、set方法
	 * */
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	

	public int getRoleID() {
		return roleID;
	}

	public void setRoleID(int roleID) {
		this.roleID = roleID;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public byte getStatus() {
		return status;
	}

	public void setStatus(byte status) {
		this.status = status;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	
}
